package com.scalesoft.artsync.plugins.util;

public class ParserUtil {

	public static String parseSection(String data, String startTerm, String endTerm, int startIndex) {
		if (data.indexOf(startTerm, startIndex) > 0) {
			int positionOfContentStart = data.indexOf(startTerm, startIndex) + startTerm.length();
			int positionOfContentEnd = data.indexOf(endTerm, positionOfContentStart);
			String result = data.substring(positionOfContentStart, positionOfContentEnd);
			return result;
		}
		
		return null;		
	}
	
}
